package com.devehx.wallet.repository;

import com.devehx.wallet.model.Recharge;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RechargeDao extends JpaRepository<Recharge, Integer> {

    /**
     * 根据哈希查找
     *
     * @param txHash 交易哈希
     */
    Recharge findIdByTxHash(String txHash);

    /**
     * 根据状态查询
     *
     * @param state 状态
     */
    List<Recharge> findTop1000ByState(Integer state);

}
